From f515e23a3753f1061d2f6546d15a8ef4c7f88d1a Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Thu, 24 Feb 2005 09:47:42 +0000 Subject: [PATCH] bitkeeper revision 1.1236.1.12 (421da2beCWorg82h5pKlUfgL04gvhA) Fix x86/64 get_stack_bottom(). Signed-off-by: Keir Fraser --- xen/include/asm-x86/x86_64/current.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-x86/x86_64/current.h b/xen/include/asm-x86/x86_64/current.h index fb5a7abc02..67d7c9ef97 100644 --- a/xen/include/asm-x86/x86_64/current.h +++ b/xen/include/asm-x86/x86_64/current.h @@ -41,8 +41,9 @@ static inline execution_context_t *get_execution_context(void) static inline unsigned long get_stack_bottom(void) { unsigned long p; - __asm__ ( "orq %%rsp,%0; andq $~7,%0" - : "=r" (p) : "0" (STACK_SIZE-64) ); + __asm__( "andq %%rsp,%0; addq %2,%0" + : "=r" (p) + : "0" (~(STACK_SIZE-1)), "i" (STACK_SIZE-64) ); return p; } -- 2.30.2